<?php

namespace app\admin\model\fm;

use think\Model;

/**
 * Chartmaster
 */
class Chartmaster extends Model
{
    // 表主键
    protected $pk = 'accountcode';
    
    // 表名
    protected $name = 'fm_chartmaster';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function groupTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Accountgroups::class, 'group', 'groupname');
    }

    public function taggroupidTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\fm\Taggroup::class, 'taggroupid', 'taggroupid');
    }
}